<template>
    <div class="info-manage-template">
        <InfoDefault v-if="curPath.startsWith('default')" ref="infoDefault"></InfoDefault>
        <ContactManage v-if="curPath.startsWith('contactManage')" ref="contactManage"></ContactManage>
        <ContactCreate v-if="curPath.startsWith('contactCreate')" ref="contactCreate"></ContactCreate>
    </div>
</template>

<script>
    import InfoDefault from "../default/InfoDefault";
    import ContactManage from "./ContactManage";
    import ContactCreate from "../create/ContactCreate";

    export default {
        name: "InfoManage",
        components: {
            InfoDefault, ContactManage, ContactCreate
        },
        data() {
            return {
                curPath: 'default'
            }
        },
        methods: {
            getWorkNo() {
                let number = this.curPath.split('@')[1];
                console.log(number)
            }
        },
        watch: {
            curPath() {
                this.getWorkNo();
            }
        }
    }
</script>

<style lang="scss">
    .info-manage-template {
        background-color: #ffffff;
        width: 100%;
        height: 100%;
    }
</style>